<template>
  <div>
    <van-tabbar v-model="active" route>
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="balance-list-o" to="/recommend"
        >种草文章</van-tabbar-item
      >
      <van-tabbar-item icon="cart-o" to="/cart" :badge="store.count"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item icon="user-o" to="/user">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script setup>
import useCartInfo from "@/stores/useCartInfo";
import { ref } from "vue";
// 选中index
const active = ref(0);

let store = useCartInfo();
</script>

<style lang="less" scoped>
</style>